<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@page import="perucuy.transfers.RacionTO"%>
<%@page import="perucuy.transfers.ProductoNutrienteTO"%>
<html:html />
<logic:present name="mensajeBusqueda">
    <strong>${mensajeBusqueda}</strong>
</logic:present>
<html:errors/>
<logic:messagesPresent message="true">
    <ul class="mensajes">
        <html:messages id="msg" message="true">
            <li>${msg}</li>
        </html:messages>
    </ul>
</logic:messagesPresent>
<html:form action="/operador/agregarRacion">
<table border="0" cellSpacing="0" cellPadding="0" width="471">
    <tr>
        <td colspan="3"><img src="<html:rewrite page="/resources/images/background_border_top.jpg"/>" /></td>
    </tr>
    <tr>
        <td width="10" class="leftcaja">&nbsp;</td>
        <td >
        <table border="0" cellSpacing="0" cellPadding="0" width="451">
            <tr>
                <td width="451" height="22"colspan="2" class="titlerow"> INGRESAR RACION</td>
            </tr>
            <td colspan="2" width="451" >&nbsp;</td>
           <tr class="style12">
                <td height="25"><bean:message key="racion.desc" />: </td>
                <td height="25">
                    <html:text property="VDscRacion" size="8" maxlength="8" styleId="VDscRacion" />&nbsp;             
                </td>
            </tr>
             <tr class="style12">
                <td height="25"><bean:message key="racion.codgrupo" />: </td>
                <td height="25">
                    <html:text property="NCodGrupo" size="8" maxlength="8" styleId="NCodGrupo" />&nbsp;             
                </td>
            </tr>   
            <tr class="style12">
                <td height="25"><bean:message key="racion.total" />: </td>
                <td height="25">
                    <html:text property="NPTotRacion" size="8" maxlength="8" styleId="NPTotRacion" />&nbsp;             
                </td>
            </tr>           
            <tr valign="top" class="style12">
                <td height="25"><bean:message key="racion.estado" />: </td>
                <td height="25" valign="top" >Activo</td>
            </tr>   
            <tr valign="top" class="style12"><td colspan="2">
                    <strong>SELECCIONAR INGREDIENTES DE LA RACION:</strong>
                    <%
                    String ruta = request.getContextPath()+"/operador/buscarIngredientes.do";
                    %>
                    <a target="buscar" onclick="return abrirVentana(this);" href="<%=ruta%>">
                        <img src="<html:rewrite page="/resources/images/download.gif"/>" width="15" height="15" border="0" alt="Buscar Ubicacion"/>
                    </a>
                    <br>
                    <img src="<html:rewrite page="/resources/images/spacer.gif"/>" height="12"/>
                    <table width="89%" border="0" cellpadding="0" cellspacing="1" id="tablaIngrediente">
                        <html:hidden property="ids_ingredienteo" value="" styleId="todocod"/>
                        <tr valign="top">
                            <td width="218" height="43" bgcolor="#666666" class="Estilo83">
                                <table width="110%" border="0" cellspacing="0" cellpadding="0" style="FONT-SIZE: 0pt">
                                    <tr class="titulo_cab_grilla">
                                        <td width="81%" >INGREDIENTE</td>
                                        <td width="19%" align="right" ><img src="<html:rewrite page="/resources/images/productos_triangulo.gif"/>" width="20" height="30" /></td>
                                    </tr>
                                    <tr class="titulo_cab_grilla">
                                        <td >&nbsp;</td>
                                        <td >&nbsp;</td>
                                    </tr>
                            </table></td>
                            <td width="234" bgcolor="#666666">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="FONT-SIZE: 0pt">
                                    <tr>
                                        <td width="90%" class="titulo_cab_grilla"><div align="center"><span class="Estilo83">PESO </span></div></td>
                                        <td width="10%" align="right" valign="top" bgcolor="#666666">
                                            <img src="<html:rewrite page="/resources/images/productos_triangulofinal.gif"/>" width="12"                                                                                      height="30" />
                                        </td>
                                    </tr>
                            </table></td>
                        </tr>
                        <tr valign="middle">
                            <td colspan="4" bgcolor="#cccccc"><img src="<html:rewrite page="/resources/images/2x2.gif"/>" width="2" height="2" /></td>
                        </tr>
                        <tbody id="cuerpoLista">
                        </tbody>
                    </table>
            </td></tr>            
            </td></tr>
            <tr>
                <td >&nbsp;</td>
                <td >&nbsp;</td>
            </tr>
            
        </table>
<img src="<html:rewrite page="/resources/images/spacer.gif"/>" height="12"/><br>
<center>
    <table border="0" cellspacing="0" cellpadding="0" width="256">
        <tr>
            <td valign="center">&nbsp;</td>
            <td valign="center">&nbsp;</td>
            <td valign="left">&nbsp;</td>
            <td valign="left">&nbsp;</td>
        </tr>
        <tr>
            <td width="24" valign="center">&nbsp;</td>
            <td width="104" valign="center">
                <html:submit styleClass="button" property="boton">
                    <bean:message key="boton.guardar"/>
                </html:submit>
            </td>
            <td width="104" valign="left">
                <html:cancel styleClass="button">
                    <bean:message key="boton.cancelar"/>
                </html:cancel>
            </td>
            <td width="24" valign="left">&nbsp;</td>
        </tr>
    </table>
    </td>					
</center>
</html:form>
<script type="text/javascript">
  cambiarTabla();
  mostrarIngredienteRacion('<%=request.getParameter("ids_ingrediente")%>');
</script>